$(function(){
    var sliderBox =$("#h5dsSwiper .layer-slider"),sliderW =$("h5dsSwiper .layer-slider").width(),sliderH=$("h5dsSwiper .layer-slider").height(),fast=sliderBox.attr("autoplay"),time=sliderBox.attr("autoplaytime"),
        sliderList=sliderBox.find(".list"),sliderLength=sliderList.find("img").length;
    //轮播动画
    console.log(sliderBox);
    function sliderAnimate(){
        sliderList.animate({'left': "+=100%"}, 500, function () {
            if(parseInt(sliderList.css('left')) > -10){
                sliderList.css('left', -100 * (sliderLength-1)+"%");
            }
            // }else if(left < -100*(len)+"%") {



            //     list.css('left', -100+"%");
            // }
        });
    }
    function play(){
        if(fast){
            setTimeout(function(){
                sliderAnimate()
                play()
            },time)
        }
    }
    play()

})